package com.chezai.client.adapter;

import android.support.annotation.LayoutRes;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chezai.client.R;
import com.chezai.client.bean.StudentStudyRecord;
import com.chezai.client.utils.DateUtil;
import com.chezai.client.utils.Util;

/**
 * 科一科四 培训记录
 * Created by zhujigao on 2017/9/13.
 */

public class TrainRecordAdapter extends BaseQuickAdapter<StudentStudyRecord, BaseViewHolder> {

    public TrainRecordAdapter(@LayoutRes int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(BaseViewHolder helper, StudentStudyRecord item) {
        helper.setText(R.id.name, item.getStuInfo().getName())
                .setText(R.id.IDCardNum, Util.idCardReplaceWithStar(item.getStuInfo().getIDCardNum()))
                .setText(R.id.signInTime, DateUtil.timestampStr(item.getSiginInTime(), "HH:mm"))
                .setText(R.id.signOutTime, DateUtil.timestampStr(item.getSiginOutTime(), "HH:mm"));
    }
}
